#!/bin/bash
PATH="/opt/java/jdk1.8.0_151/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin"

cd docker-hive

docker-compose kill

docker-compose up -d namenode

docker-compose up -d datanode

sleep 120


docker-compose ps


echo "======================to do load=========================="
ip=`docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' docker-hive_namenode_1`
 /opt/datax/bin/datax.py --jvm="-Xms200M -Xmx200M" -p"-Dip=$ip" /opt/datax/job/exp_record_in_out_info.job

docker-compose ps

